import "./index.scss";
import { GoodsContext } from "../../index";
import { useContext } from "react";
function GoodsDetail() {
  const goods = useContext(GoodsContext);

  return (
    <div className="goods-detail">
      <ul className="attrs">
        {goods?.details.properties.map((item: any) => (
          <li key={item.id}>
            <span className="dt">{item.name}</span>
            <span className="dd">{item.value}</span>
          </li>
        ))}
      </ul>
      {/* <!-- 图片 --> */}
      {goods?.details.pictures.map((item: any) => (
        <img src={item} alt="" key={item.id} />
      ))}
    </div>
  );
}
export default GoodsDetail;
